ALTER TABLE cmsProduct
ALTER COLUMN Description ntext

go


ALTER PROCEDURE [dbo].[spcmsProduct_Insert] 
	(
@ProductCode nvarchar(250)=null,
@ProductTitle nvarchar(250)=null,
@ProductCategoryID int=null,
@Description ntext=null,
@DetailDescription ntext=null,
@ProductImage nvarchar(250)=null,
@IsNew bit=null,
@IsBestbuy bit=null,
@OrderID int=null,
@Price bigint=null,
@ChartImage nvarchar(250)=null,
@IsPromotion bit=null,
@SalePrice bigint=null,
@IsSetTop bit=null,
@IsHomepage bit=null,
@IsFinished bit=null,
@PromotionEndDate datetime=null,
@OriginID int=null,
@BrandID int=null,
@MetaDes nvarchar(250)=null,
@MetaTag nvarchar(250)=null,
@PageTitle nvarchar(250)=null,
@Active bit=null,
@Thumbnail nvarchar(250)=null,
@PromotionImages nvarchar(250)=null,
@Warranty ntext=null,
@Provider ntext=null,
@TermOfUse ntext=null,
@HomeDescription ntext=null,
@MemberPrice bigint=null
)
AS
Insert Into 
cmsProduct 
(
[ProductCode],
[ProductTitle],
[ProductCategoryID],
[Description],
[DetailDescription],
[ProductImage],
[IsNew],
[IsBestbuy],
[OrderID],
[Price],
[ChartImage],
[IsPromotion],
[SalePrice],
[IsSetTop],
[IsHomepage],
[IsFinished],
[PromotionEndDate],
[OriginID],
[BrandID],
[MetaDes],
[MetaTag],
[PageTitle],
[Active],
[Thumbnail],
[PromotionImages],
[Warranty],
[Provider],
[TermOfUse],
[HomeDescription],
[MemberPrice]
) 
values(
@ProductCode,
@ProductTitle,
@ProductCategoryID,
@Description,
@DetailDescription,
@ProductImage,
@IsNew,
@IsBestbuy,
@OrderID,
@Price,
@ChartImage,
@IsPromotion,
@SalePrice,
@IsSetTop,
@IsHomepage,
@IsFinished,
@PromotionEndDate,
@OriginID,
@BrandID,
@MetaDes,
@MetaTag,
@PageTitle,
@Active,
@Thumbnail,
@PromotionImages,
@Warranty,
@Provider,
@TermOfUse,
@HomeDescription,
@MemberPrice
)
RETURN Scope_identity()

go
ALTER PROCEDURE dbo.[spcmsProduct_UpdateByPK] 
	(
@ProductID int,
@ProductCode nvarchar(250)=null,
@ProductTitle nvarchar(250)=null,
@ProductCategoryID int=null,
@Description ntext=null,
@DetailDescription ntext=null,
@ProductImage nvarchar(250)=null,
@IsNew bit=null,
@IsBestbuy bit=null,
@OrderID int=null,
@Price bigint=null,
@ChartImage nvarchar(250)=null,
@IsPromotion bit=null,
@SalePrice bigint=null,
@IsSetTop bit=null,
@IsHomepage bit=null,
@IsFinished bit=null,
@PromotionEndDate datetime=null,
@OriginID int=null,
@BrandID int=null,
@MetaDes nvarchar(250)=null,
@MetaTag nvarchar(250)=null,
@PageTitle nvarchar(250)=null,
@Active bit=null,
@Thumbnail nvarchar(250)=null,
@PromotionImages nvarchar(250)=null,
@Warranty ntext=null,
@Provider ntext=null,
@TermOfUse ntext=null,
@HomeDescription ntext=null,
@MemberPrice bigint=null
)
AS
Update  cmsProduct Set 
[ProductCode]=@ProductCode,
[ProductTitle]=@ProductTitle,
[ProductCategoryID]=@ProductCategoryID,
[Description]=@Description,
[DetailDescription]=@DetailDescription,
[ProductImage]=@ProductImage,
[IsNew]=@IsNew,
[IsBestbuy]=@IsBestbuy,
[OrderID]=@OrderID,
[Price]=@Price,
[ChartImage]=@ChartImage,
[IsPromotion]=@IsPromotion,
[SalePrice]=@SalePrice,
[IsSetTop]=@IsSetTop,
[IsHomepage]=@IsHomepage,
[IsFinished]=@IsFinished,
[PromotionEndDate]=@PromotionEndDate,
[OriginID]=@OriginID,
[BrandID]=@BrandID,
[MetaDes]=@MetaDes,
[MetaTag]=@MetaTag,
[PageTitle]=@PageTitle,
[Active]=@Active,
[Thumbnail]=@Thumbnail,
[PromotionImages]=@PromotionImages,
[Warranty]=@Warranty,
[Provider]=@Provider,
[TermOfUse]=@TermOfUse,
[HomeDescription]=@HomeDescription,
[MemberPrice]=@MemberPrice
 
where 
[ProductID]=@ProductID


Return